<?php
!function_exists('zeai_alone') && exit('Forbidden!');
$uidd=$uid;$nicknamee=$nickname;
$TRnav_btn='hide';
$t = (ifint($t,'1-4','1'))?$t:1;
if(@in_array('trend',$navarr)){$t2num = $db->COUNT(__TBL_TREND__,"uid=".$uid);$t2num=($t2num>0)?'('.$t2num.')':'';}
//if(@in_array('video',$navarr)){$t4num = $db->COUNT(__TBL_VIDEO__,"uid=".$uid);$t4num=($t4num>0)?'('.$t4num.')':'';}
//
$rt_photo=$db->query("SELECT path_s FROM ".__TBL_PHOTO__." WHERE uid=".$uid." AND flag=1 ORDER BY id DESC");
$photo_total = $db->num_rows($rt_photo);
$t3num = $db->COUNT(__TBL_PHOTO__,"uid=".$uid);$t3num=($photo_total>0)?'('.$photo_total.')':'';
//
$rt_video=$db->query("SELECT id,path_s FROM ".__TBL_VIDEO__." WHERE uid=".$uid." AND flag=1 ORDER BY id DESC");
$video_total = $db->num_rows($rt_video);
$t4num = $db->COUNT(__TBL_PHOTO__,"uid=".$uid);$t4num=($video_total>0)?'('.$video_total.')':'';
?><style>
.nickname dd i.ed:before{color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.unav a.ed{color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.unav a.ed:after{background-color:<?php echo $_ZEAI['mob_mbcolor'];?>;}
.u2data dt i{border:rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.15) 1px solid;color:rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.3);}
.u2data dd{border-left:rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.1) 1px solid;}
.u2data dd li.more{color:<?php echo $_ZEAI['mob_mbcolor'];?>;}
.u2top .agree.ed{background-color:rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.4)}
#hi_handbox ul li.ed,#hi_handbox ul li:hover{background-color:rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.1);color:<?php echo $_ZEAI['mob_mbcolor'];?>}
#hi_handbox button,#hnbox button{box-shadow:0 3px 8px rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.4)}
#hmd_box a.ed{color:<?php echo $_ZEAI['mob_mbcolor'];?>}
#hnbox dl dt div.admid .hnpic b{background-color:rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.8)}
#hnbox dl{color:<?php echo $_ZEAI['mob_mbcolor'];?>}
#hnbox button{box-shadow:0 3px 8px rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.4)}
.trend dl .agree i.ed font,.trend dl .agree i:hover{color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.trend dl dt span.ed,.trend dl dd span.chat{background-color:rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.08);color:<?php echo $_ZEAI['mob_mbcolor'];?>;border-color:rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.2)}
</style>
<a class="UgobackFix"><i class='ico' onclick="zeai.back()">&#xe602;</i></a>
<div class="Ublack" id="TRnav_btn"><i class="ico">&#xe614;</i></div>
<?php if(@in_array('xqcard',$navarr) && $xqk_ifshow==1){?><a id="tgxqk" href="tg_my_ucard.php?submitok=tg_my_ucard_list&uid=<?php echo $uid;?>"><i class="ico">&#xe6b6;</i><span>相亲卡</span></a><?php }?>
<div class="u2top">
	<div class="bg"><img src="<?php echo $photo_b_url; ?>" id="photo_m" /></div>
    <div id="agree2" class="agree"><i class="ico">&#xe652;</i><b class="agreefly">+1</b><font><?php echo $agree;?></font></div>
    <!--<div class="gps"><i class="ico">&#xe624;</i> <?php echo $area_s_title;?></div>-->
    <?php if ($parent > 1 || $cook_ifadm==1){?><div class="parent"><?php echo $parent_str;?></div><?php }?>
	<?php
	$pathlist = '';
	$rt2=$db->query("SELECT path_s FROM ".__TBL_PHOTO__." WHERE uid=".$uidd." AND flag=1 ORDER BY id DESC");
	$photo_total = $db->num_rows($rt2);
	if ($photo_total>0) {
		$pathlist = '<a href="'.$jumpurl.'&t=3" class="pathlist">';
		for($i2=1;$i2<=3;$i2++) {
			$rows2 = $db->fetch_array($rt2,'num');
			if(!$rows2) break;
			$photo_flag = photo_s_out('{"sex":"'.$sex.'","photo_s":"'.$rows2[0].'","photo_f":"'.$photo_f.'","photo_ifshow":"'.$photo_ifshow.'","uflag":"'.$uflag.'","outkind":"flag"}');
			$photo_cls  = (!$photo_flag)?' class="blur"':'';
			$pathlist  .= '<img src="'.UP.$rows2[0].'"'.$photo_cls.'>';
		}
		$pathlist .= '</a>';
		echo $pathlist;
	}
	?>
</div>
<?php 
//防骗/防托设置
if ($chcit == 1 && !$chcis_if && $Ukind!=2 && ifint($cook_uid) && $cook_uid!=$uid){
	$chcit_listr=(@in_array('mob',$chcis) && !in_array('mob',$RZarr))?'【'.RZtitle('mob').'】':'';
	if(empty($chcit_listr))$chcit_listr.=(@in_array('identity',$chcis) && !in_array('identity',$RZarr))?'【'.RZtitle('identity').'】':'';
	if(empty($chcit_listr))$chcit_listr.=(@in_array('photo',$chcis) && !in_array('photo',$RZarr))?'【'.RZtitle('photo').'】':'';
	if(empty($chcit_listr))$chcit_listr.=(@in_array('store',$chcis) && !in_array('store',$RZarr))?'【'.RZtitle('store').'】':'';?>
	<div class="chcit ">此用户未完成<?php echo $chcit_listr;?> <button id="chcit">提醒对方认证</button></div><?php
}?>
<div class="nickname">
    <dt>
        <h3><b><?php echo $nickname;?></b><?php echo uicon($sex.$grade,2);echo ($grade>1)?'<img src="'.RES.'m/img/vipj.png" class="vipj">':'';?></h3>
        <h5 onclick="zeai.copy('<?php echo $uid;?>',function(){zeai.msg('ID复制成功');})">ID:<?php echo $uid;?>　<span class="S12"><?php echo (!empty($area_s_title))?'<i class="ico">&#xe624;</i>'.$area_s_title:'';?></span></h5>
    	<ul>
        <?php if (!empty($birthday) && $birthday!='0000-00-00'){?><li><?php echo getage($birthday);?>岁</li><?php }?>
        <?php if (!empty($heigh)){?><li><?php echo udata('heigh',$heigh);?></span></li><?php }?>
        <?php if (!empty($job)){?><li><?php echo udata('job',$job);?></li><?php }?>
        <?php if (!empty($pay)){?><li><?php echo udata('pay',$pay);?></li><?php }?>
        </ul>
    </dt>
    <dd><i<?php echo $gzclass; ?> id="gz2"></i></dd>
    <?php if (@in_array('sign',$navarr) && !empty($sign_pdf_path) && $sign_pdf_flag==1){echo '<img src="'.RES.'cert_sign.png" class="sign" />';}?>
</div>
<div class="unav">
	<a href="<?php echo $jumpurl;?>"<?php echo ($t==1)?' class="ed"':'';?>>资料</a>
	<?php if(@in_array('trend',$navarr)){?><a href="<?php echo $jumpurl;?>&t=2"<?php echo ($t==2)?' class="ed"':'';?>>动态<?php echo $t2num;?></a><?php }?>
	<a href="<?php echo $jumpurl;?>&t=3"<?php echo ($t==3)?' class="ed"':'';?>>相册<?php echo $t3num;?></a>
	<?php if(@in_array('video',$navarr)){?><a href="<?php echo $jumpurl;?>&t=4"<?php echo ($t==4)?' class="ed"':'';?>>视频<?php echo $t4num;?></a><?php }?>
</div>
<?php
if($t==1){
//Ta的认证
$RZnum = count($RZarr);
if ($RZnum>0 && is_array($RZarr) && !empty($RZ)){?>
<div class="u2data signpos" onClick="ucertFn();">
	<dt><i class="ico">&#xe66b;</i>Ta的认证<span class="ico">已点亮<?php echo $RZnum;?>项认证　更多&#xe601;</span></dt>
    <dd><div class="u2cert2"><?php
		foreach ($rz_dataARR as $k=>$V){
			if((!in_array($V,$RZarr)))continue;
			$rztitle=rz_data_info($V,'title');?>
			<div class="li ed">
				<i class="ico <?php echo $V;?>"<?php echo (in_array($V,$RZarr))?RZbg($V):'';?>><?php echo rz_data_info($V,'ico');?>
				<?php if (in_array($V,$RZarr)){?><span class="ico">&#xe60f;</span><?php }?></i>
				<h4><?php echo $rztitle;?></h4>
			</div><?php
		}
		?>
		<div class="clear"></div>
	</div></dd>
</div>
<?php }
//基本资料?>
<div class="clear"></div>
<div class="u2data">
	<dt><i class="ico">&#xe679;</i>基本资料</dt>
    <dd>
        <li><?php echo $sex_str2;?></li>
        <?php if (!empty($birthday) && $birthday!='0000-00-00'){?><li><?php echo getage($birthday);?>岁(<?php echo substr($birthday,0,7);?>)</li><?php }?>
        <?php if (!empty($birthday) && $birthday!='0000-00-00'){?>
            <li>属<?php echo getbirthpet($birthday);?></li>
            <li><?php echo getstar($birthday);?></li>
        <?php }?>
        <?php if (!empty(udata('love',$love))){?><li><?php echo udata('love',$love);if (!empty($child)){?>(<?php echo udata('child',$child);?>)<?php }?></li><?php }?>
        <?php if (!empty($areatitle)){?><li>在<?php echo $area_s_title;?>工作</li><?php }?>
        <?php if (!empty($area2title)){?><li>户籍：<?php echo $area_s_title2;?></li><?php }?>
        <?php if (!empty($heigh)){?><li><?php echo udata('heigh',$heigh);?></span></li><?php }?>
        <?php if (!empty($weigh)){?><li><?php echo udata('weigh',$weigh);?></span></li><?php }?>
        <?php if (!empty($edu)){?><li><?php echo udata('edu',$edu);?></li><?php }?>
        <?php if (!empty($pay)){?><li><?php echo udata('pay',$pay);?></li><?php }?>
        <?php if (!empty($job)){?><li><?php echo udata('job',$job);?></li><?php }?>
        <?php if (!empty($house)){?><li><?php echo udata('house',$house);?></li><?php }?>
        <?php if (!empty($car)){?><li><?php echo udata('car',$car);?></li><?php }?>
        <?php $marrytime_str=udata('marrytime',$marrytime);if (!empty($marrytime) && $marrytime_str!='不限'){?><li>期望<?php echo $marrytime_str;?>结婚</li><?php }?>
        <li class="more" id="mydatamore">查看更多</li>
    </dd>
</div>
<?php 
//择偶要求
if(!empty($mate_li_out)){?>
<div class="clear"></div>
<div class="u2data">
	<dt><i class="ico">&#xe65a;</i>择偶要求</dt>
    <dd><?php echo $mate_li_out;?></dd>
</div>
<?php }
//自我介绍
if (str_len($aboutus)>1){ ?>
<div class="clear"></div>
<div class="u2data aboutus2">
	<dt><i class="ico">&#xe6b6;</i>自我介绍</dt>
    <dd><li class="aboutus2"><?php echo $aboutus; ?></li></dd>
</div>
<?php }
//红娘评价
if (!empty($hnbbs) && in_array('ubbs',$navarr) && ($user_bbs['showkind']==2 || $user_bbs['showkind']==3)){ ?>
<div class="clear"></div>
<div class="u2data aboutus2">
	<dt><i class="ico">&#xe613;</i>红娘评价</dt>
    <dd><li class="aboutus2"><?php echo $hnbbs; ?></li></dd>
</div>
<?php }
//用户评价
if (in_array('ubbs',$navarr) && ($user_bbs['showkind']==1 || $user_bbs['showkind']==3)){
	$rt=$db->query("SELECT a.flag,a.senduid,a.addtime,a.content,b.sex,b.photo_s,b.photo_f,b.flag AS uflag,b.photo_ifshow FROM ".__TBL_USER_BBS__." a,".__TBL_USER__." b WHERE (a.flag=1 OR a.flag=0) AND a.senduid=b.id AND a.uid=".$uid." ORDER BY a.id DESC");
	$total = $db->num_rows($rt);?>
<div class="clear"></div>
<div class="u2data aboutus2">
	<dt><i class="ico">&#xe676;</i>评价此人<?php if ($total > 0){?><a href="javascript:;" class="ico FR zeaicolor" id="bbs_btn1">&#xe676; 我要评价　<font>&#xe601;</font></a><?php }?></dt>
    <dd>
		<div class="ubbsu"><?php
		if ($total > 0) {
			for($ii=1;$ii<=$total;$ii++) {
				$rows = $db->fetch_array($rt,'name');
				if(!$rows) break;
				$senduid = $rows['senduid'];
				$sex     = $rows['sex'];
				$photo_s  = $rows['photo_s'];
				$photo_f  = $rows['photo_f'];
				$flag     = $rows['flag'];
				$uflag    = $rows['uflag'];
                $photo_ifshow = $rows['photo_ifshow'];
				$content  = dataIO($rows['content'],'out');
				$content  = ($flag==0)?'审核中':$content;
				$addtime  = date_str($rows['addtime']-10);
				$photo_s_url=photo_s_out('{"sex":"'.$sex.'","photo_s":"'.$photo_s.'","photo_f":"'.$photo_f.'","photo_ifshow":"'.$photo_ifshow.'","uflag":"'.$uflag.'","outkind":"url"}');
				echo '<em><span><img src="'.$photo_s_url.'" '.$ublurClass.'></span><font><i class="ico">&#xe634; 评价于'.$addtime.'</i><br>'.$content.'</font><div class="clear"></div></em>';
			}
		}else{?>
        	<div class="nobbs">
				<span>暂无评价</span><button class="btn size2 zeaibg yuan" id="bbs_btn1">　我要评价　</button>
            </div>
			<?php
        }
	?>
    </div>
    </dd>
</div>
<?php }?>
<div class="clear"></div>
<div class="u2data aboutus2" <?php if ($cook_grade <=1){?> onclick="zeai.openurl('my_vip.php?jumpurl=<?php echo $jumpurl;?>');"<?php }?>>
	<dt><i class="ico">&#xe626;</i>最近登录</dt>
    <dd><li class="aboutus2">
    <?php if ($cook_grade > 1 && ifint($cook_uid)){?>
    最近登录时间：<?php echo $endtime;?>
    <?php }else{ ?>
    最近登录时间：VIP用户可见 <i class="ico">&#xe62d;</i> <span class="zeaicolor" onclick="zeai.openurl('my_vip.php?jumpurl=<?php echo $jumpurl;?>');">点击开通VIP</span>
    <?php }?>  
    </li></dd>
</div>
<?php
//礼物
if(@in_array('gift',$navarr) && $Ukind!=2){?>
<div class="ugift" onclick="gift2_btnFn()">
    <?php $gifnum=$db->COUNT(__TBL_GIFT_USER__,"uid=".$uid); ?>
    <ul id="gift">
    <li gid="0" uid="<?php echo $uid; ?>"><i class="ico">&#xe600;</i><?php if ($gifnum>0){?><font>收到<?php echo $gifnum;?>份</font><?php }?></li>
    <?php 
    $SQLgift2 = ",(SELECT MAX(id) AS max_id FROM ".__TBL_GIFT_USER__." WHERE uid=".$uid." GROUP BY gid) C";
    $rt=$db->query("SELECT B.id,B.picurl FROM ".__TBL_GIFT_USER__." A,".__TBL_GIFT__." B ".$SQLgift2." WHERE A.id=max_id AND A.uid=".$uid." AND A.gid=B.id GROUP BY A.gid ORDER BY A.id DESC LIMIT 3");
    $total = $db->num_rows($rt);
    if ($total==0){
        echo '<em>缘分，从送第一份礼物开始认识！</em>';
    }else{
        for($i=1;$i<=$total;$i++) {
            $rows = $db->fetch_array($rt,'num');
            if(!$rows) break;
            $gid    = $rows[0];
            $picurl = UP.$rows[1];
            $gnum = $db->COUNT(__TBL_GIFT_USER__,"uid=".$uid." AND gid=".$gid);
            $gnum_str = ($gnum > 0)?'<b>X'.$gnum.'</b>':'';
            echo '<li gid="'.$gid.'"><img src="'.$picurl.'">'.$gnum_str.'</li>';
        }
    }
    ?>
    <div class="clear"></div>
    </ul>
</div>
<?php }
//开通VIP
if(ifint($cook_uid)){
	$uroleVIP = json_decode($_ZEAI['urole'],true);
	rsort($uroleVIP);$maxkey=max($uroleVIP);$maxg= $maxkey['g'];	
}
if($cook_grade<$maxg && $Ukind!=2 || !ifint($cook_uid)){?>
<div class="clear"></div>
<div class="vip2">
    <span class="vippic"><?php echo $photo_m_str;?></span>
    <span class="viptitle">开通会员・飞速脱单</span>
    <span class="vipc">相亲成功率提升300%</span>
    <span class="vipbtn ico" onClick="zeai.openurl('my_vip.php?jumpurl=<?php echo $jumpurl;?>')">&#xe6ab; 升级VIP</span>
</div>
<?php }
//猜你喜欢
if(ifint($cook_uid && !empty($cook_sex))){
	$SQLxh  = mate_diy_SQL($mateROW);
	if($cook_ifadm!=1)$SQLxh .= ($cook_sex == 2)?" AND sex=1 ":" AND sex=2 ";
}
$rt=$db->query("SELECT id,nickname,sex,photo_s,photo_f,birthday,photo_ifshow,photo_f,flag FROM ".__TBL_USER__." WHERE birthday<>'0000-00-00' AND photo_s<>'' AND nickname<>'' AND flag=1".$SQLxh." ORDER BY refresh_time DESC,id DESC LIMIT 5");
	$total = $db->num_rows($rt);
	if ($total > 0) {?>
		<div class="clear"></div>
		<div class="detaiuser">
			<div class="tj"><b>猜你喜欢</b><a href="my_info.php?t=3&jumpurl=u.php?uid=<?php echo $uid;?>" class="ico zeaicolor">&#xe610; 设置要求</a><a href="my_mateshow.php" class="ico zeaicolor">　&#xe601;</a></div>
			<?php
			for($i=1;$i<=$total;$i++) {
				$rows = $db->fetch_array($rt,'name');
				if(!$rows) break;
				$uid      = $rows['id'];
				$nickname = dataIO($rows['nickname'],'out');
				$sex      = $rows['sex'];
				$photo_s  = $rows['photo_s'];
				$photo_f  = $rows['photo_f'];
				$birthday = $rows['birthday'];
				$photo_ifshow = $rows['photo_ifshow'];
				$uflag = $rows['flag'];
				$birthday_str = (getage($birthday)<=0)?'':' '.getage($birthday).'岁';
				$img_str = photo_s_out('{"sex":"'.$sex.'","photo_s":"'.$photo_s.'","photo_f":"'.$photo_f.'","photo_ifshow":"'.$photo_ifshow.'","uflag":"'.$uflag.'","outkind":"img"}');?>
				<li><a href="<?php echo mHref('u',$uid);?>"><?php echo $img_str; ?><h5><?php echo $nickname; ?></h5><font><?php echo $birthday_str;?></font></a></li>
			<?php }?>
			<div class="clear"></div>
		</div>
<?php }?>
<script>
	mydatamore.onclick=mydataFn;<?php 
	if (!empty($photo_s) && $photo_f == 1){?>
		var photo_b = '<?php echo $photo_b_url;?>';
		photo_m.onclick=photo_mFn;<?php
	}?>
	gz2.onclick=function(){gz=gz2;gzFn(2);}
</script>
<?php
//动态
}elseif($t==2){
	$ZEAI_SQL = " a.uid=b.id AND b.flag=1 AND a.uid=".$uid;// AND a.uid=.$uid;
	$ZEAI_SELECT = "SELECT a.id,a.uid,a.piclist,a.content,a.agreenum,a.agreelist,a.addtime,b.sex,b.grade,b.nickname,b.photo_s,b.photo_f,b.birthday,b.pay,b.heigh,b.edu,b.areatitle,b.photo_ifshow FROM ".__TBL_TREND__." a,".__TBL_USER__." b WHERE ".$ZEAI_SQL." ORDER BY a.id DESC";
	$rt=$db->query($ZEAI_SELECT);
	$total = $db->num_rows($rt);
	if ($total==0) {
		echo "<div class='nodatatips'><i class='ico'>&#xe63b;</i>Ta暂时还木有动态</div>";
	} else {
		function rows_list($rows){
			global $_ZEAI,$db,$cook_uid;
			$id            = $rows['id'];
			$uid           = $rows['uid'];
			$piclist       = $rows['piclist'];
			$content       = dataIO($rows['content'],'out');
			$agreenum      = $rows['agreenum'];
			$agreelist     = $rows['agreelist'];
			$addtime_str   = date_str($rows['addtime']);
			$areatitle     = $rows['areatitle'];
			$area_s_title = explode(' ',$areatitle);$area_s_title = $area_s_title[1];
			//
			$sex           = $rows['sex'];
			$grade         = $rows['grade'];
			$nickname      = dataIO($rows['nickname'],'out');
			$nickname      = (empty($nickname))?'uid:'.$uid:$nickname;
			$photo_s       = $rows['photo_s'];
			$photo_f       = $rows['photo_f'];
			$photo_ifshow  = $rows['photo_ifshow'];
			$birthday      = $rows['birthday'];
			$pay           = $rows['pay'];
			$heigh         = $rows['heigh'];
			$edu           = $rows['edu'];
			//
			$piclist_str = '';
			if (!empty($piclist)){
				$piclist = explode(',',$piclist);
				if (count($piclist) >= 1){foreach ($piclist as $value){$piclist_str .= '<img src="'.UP.$value.'">';}}
			}
			//
			$echo  ='<dl id="dl'.$id.'">';
			$echo .='<dd>';
			//
			if(strstr($content,"photo_v")){
				preg_match('/<img.+src=\"?(.+\.(jpg))\"?.+>/i',$content,$match);
				$src = $match[1];
				$mp4 = str_replace('.jpg','.mp4',$src);
				$cvs = '<video class="zeaiVbox" id="zeaiVbox'.$id.'"><source src="'.$mp4.'">您浏览器本太低，请升级</video><span class="play ico">&#xe603;</span>';
				if(is_h5app()){ 		
					$vplay   = 'javascript:app_VideoPlayer("'.$mp4.'");';
				}else{
					$vplay   = 'zeaiplay("'.$id.'")';
				}
				$content = '<h1>上传了个人视频</h1><span class="vbox"><strong onclick='.$vplay.'><img src="'.$src.'">'.$cvs.'</strong></span>';
				$echo   .=$content;
			}else{
				$echo .='<h1>'.$content.'</h1>';
			}
			//
			if (!empty($piclist)){$echo .='<p>'.$piclist_str.'</p>';}
			
			$agreebbs='';
			//bbs
			$rt=$db->query("SELECT a.flag,a.uid,a.content,a.addtime,U.photo_s,U.photo_f,U.uname,U.nickname,U.sex,U.photo_ifshow FROM ".__TBL_TREND_BBS__." a,".__TBL_USER__." U WHERE a.uid=U.id AND U.flag=1 AND a.fid=$id ORDER BY a.id DESC");
			$C = '';$k=0;
			WHILE ($rowsbbs = $db->fetch_array($rt,'name')){
				$k++;
				$flag     = $rowsbbs['flag'];
				$uid      = $rowsbbs['uid'];
				$sex      = $rowsbbs['sex'];
				$photo_s  = $rowsbbs['photo_s'];
				$photo_f  = $rowsbbs['photo_f'];
				$photo_ifshow = $rowsbbs['photo_ifshow'];
				$uname    = dataIO($rowsbbs['uname'],'out');
				$nickname = dataIO($rowsbbs['nickname'],'out');
				$nickname = (empty($nickname))?$uname:$nickname;
				$nickname = (ifmob($nickname))?$uid:$nickname;
				$content  = trimhtml(dataIO($rowsbbs['content'],'out'));
				$content  = ($flag==1)?$content:'<font class="C999">审核中</font>';
				$photo_s_url=photo_s_out('{"sex":"'.$sex.'","photo_s":"'.$photo_s.'","photo_f":"'.$photo_f.'","photo_ifshow":"'.$photo_ifshow.'","uflag":"'.$uflag.'","outkind":"url"}');
				$addtime    = date_str($rowsbbs['addtime']);
				$C .= '<li>';
				$C .= '<a onClick="trend_uFn('.$uid.')"><img class="m" src="'.$photo_s_url.'" uid="'.$uid.'"><h5>'.$nickname.'：<font>'.$addtime.'</font></h5></a>';
				$C .= '<span>'.trimContact($content).'</span>';
				$C .= '</li>';
			}
			//bbs end
			//agree
			if (!empty($agreelist)){
				$agreelistarr= explode(',',$agreelist);
				$agree_class = (in_array($cook_uid,$agreelistarr))?' class="ed"':'';
				$agree_ulist = '';
				foreach ($agreelistarr as $uid2){
					$AU = $db->ROW(__TBL_USER__,"sex,photo_s,photo_f,photo_ifshow","id=".$uid2,"num");
					$sex2     = $AU[0];
					$photo_s2 = $AU[1];
					$photo_f2 = $AU[2];
					$photo_ifshow2 = $AU[3];
					$photo_s2_url=photo_s_out('{"sex":"'.$sex2.'","photo_s":"'.$photo_s2.'","photo_f":"'.$photo_f2.'","photo_ifshow":"'.$photo_ifshow2.'","uflag":"'.$uflag2.'","outkind":"url"}');
					$agree_ulist .= '<img src="'.$photo_s2_url.'" uid="'.$uid2.'">';
				}
			}else{
				$agree_class = '';
			}
			$agreebbs ='<div class="agree" tid="'.$id.'"><span class="time">'.$addtime_str.'发布</span><i'.$agree_class.'><font class="ico">&#xe652;</font><font> 赞<b class="agreefly">+1</b><span>'.$agreenum.'</span>　</font></i><i><font class="ico">&#xe676;</font><font> 评<span>'.$k.'</span></font></i></div>';
			if ($agreenum>0 || $k>0){$agreebbs .='<div class="j"></div>';}
			if ($agreenum>0 && !empty($agreelist)){$agreebbs .='<em>'.$agree_ulist.'</em>';}
			if(!empty($C))$agreebbs .='<ul>'.$C.'</ul>';
			$echo .='</dd>';
			$echo .=$agreebbs;
			$echo .='</dl>';
			return $echo;
		}
		?>
        <div class="trend" id="ZEAI_list">
		<?php
		for($i=1;$i<=$total;$i++){
			$rows = $db->fetch_array($rt,'name');
			if(!$rows) break;
			echo rows_list($rows);
		}?>
		</div>
		<script src="<?php echo RES;?>m/js/u2_trend.js?<?php echo $_ZEAI['cache_str'];?>"></script>
        <?php
	}
//相册
}elseif($t==3){
	if ($photo_total>0) {
		echo '<div class="uPlist2" id="Plist">';
		$pic_list = array();
		for($i=1;$i<=$photo_total;$i++) {
			$rows = $db->fetch_array($rt_photo);
			if(!$rows) break;
			$path_s   = smb($rows[0],'b');
			$dst_s    = UP.$path_s;
			$dst_b    = smb($dst_s,'b');
			$blursty=($ifblur==1)?' class="blur"':'';
			if($photo_ifshow==0){
				$dst_s=RES.'photo_m'.$sex.'_hide.png?'.$_ZEAI['cache_str'];	
				$pic_list[]= $dst_s;
			}else{
				$pic_list[]= $dst_b;
			}
			echo '<img src="'.$dst_s.'"'.$blursty.'>';
		}
		$pic_list = encode_json($pic_list);
		//if($ifblur==1)echo $lockstr;
		echo '<div class="clear"></div></div>';
	}else{
		echo "<div class='nodatatips'><i class='ico'>&#xe648;</i>Ta还没上传相册</div>";
	}
//视频
}elseif($t==4){
	if ($video_total>0) {
		echo '<div class="uVlist2">';
		$pic_list = array();
		for($i=1;$i<=$video_total;$i++) {
			$rows = $db->fetch_array($rt_video);
			if(!$rows) break;
			$vid    = $rows[0];
			$path_s = $rows[1];
			$dst_s  = UP.$path_s;
			$dst_b  = smb($dst_s,'b');
			//$blursty=($ifblur==1)?' class="blur"':'';
			//if($photo_ifshow==0){
			//	$dst_s=RES.'photo_m'.$sex.'_hide.png?'.$_ZEAI['cache_str'];	
			//	$pic_list[]= $dst_s;
			//}else{
			//	$pic_list[]= $dst_b;
			//}
			echo '<a href="'.mHref('video',$vid).'"><img src="'.$dst_s.'"'.$blursty.'><i class="ico">&#xe603;</i></a>';
		}
		//$pic_list = encode_json($pic_list);
		//if($ifblur==1)echo $lockstr;
		echo '<div class="clear"></div></div>';
	}else{
		echo "<div class='nodatatips'><i class='ico'>&#xe68a;</i>Ta还没发布视频信息</div>";
	}
}//t end?>

<?php
//gift box
if(@in_array('gift',$navarr)&&$Ukind!=2 && $cook_uid!=$uid){?>
<div id="giftbox">
    <a class="btn size3 B S18 zeaibg yuan" onClick="gift2_load();"> 换一组 <i class="ico">&#xe67d;</i></a>
	<span class="zeaicolor tips">缘分，从送第一份礼物开始认识！ <a href="gift.php?uid=<?php echo $uidd;?>" class="B">更多</a></span>
    <div id="giflist"></div>
</div>
<div id="box_gift" class="box_gift">
    <em><img><h3></h3><h6></h6></em>
    <a href="javascript:;">我再想想</a>
    <a href="javascript:;">立即赠送</a>
</div>
<script>gift2_load();</script>
<?php }
//hibox
if ($ifhi && $_SMS['hi_kind']==2){
	$hi_textlist=explode('<br>',$_SMS['hi_textlist']);
	$hi_textlist=shuffle_arr($hi_textlist);?>
<div id="hi_handbox">
	<a onClick="hi_refreshbtn(<?php echo $uid;?>);" class="zeaicolor B">换一组<i class="ico">&#xe67d;</i></a>
	<ul id="hi_list">
		<?php 
		if (count($hi_textlist) >= 1 && is_array($hi_textlist)){
			$h=0;
			foreach ($hi_textlist as $V) {
				if($h==4)continue;
				$V=trimhtml(dataIO($V,'out'));
				echo '<li><i class="ico zeaicolor">&#xe8ca;</i>'.$V.'</li>';
				$h++;
			}
		}
        ?>
    </ul>
    <button type="button" class="btn size4 zeaibg yuan" onClick="hi_btnFn(<?php echo $uid;?>);">开始发送 <i class="ico">&#xe6bd;</i></button>
</div>
<script>var ulli=zeai.tag(hi_list,'li');zeai.listEach(ulli,function(obj){obj.onclick=function(){resetclass(ulli);obj.class('ed');}});</script>
<?php }?>
<div id="lx_box">
	<?php
	if ($iflx_alloff){?>
    	<div class="lx_kefu">
			<?php if (!empty($kf_wxpic) ){?><img src="<?php echo UP.$kf_wxpic;?>"><font>长按二维码加客服微信</font><br /><?php }?>
			<?php if (!empty($kf_tel)){?>
                <i class="ico zeaicolor">&#xe68b;</i> <a href="tel:<?php echo $kf_tel;?>" class="zeaicolor"><?php echo $kf_tel;?> (点击拔打)</a>
            <?php }else{?>
                <?php if (!empty($kf_mob)){?><i class="ico zeaicolor">&#xe627;</i> <a href="tel:<?php echo $kf_mob;?>" class="zeaicolor"><?php echo $kf_mob;?> (点击拔打)</a><?php }?>
            <?php }?>
        </div>
    <?php }else{?>
		<?php if($ifchat){?><a id="lx_chat"><i class="ico">&#xe676;</i><span>在线聊天</span></a><?php }?>
        <?php if($ifcontact){?><a id="lx_lxfs"><i class="ico">&#xe68b;</i><span>联系方式</span></a><?php }?>
        <?php if($ifhn){?><a id="lx_hn"><i class="ico">&#xe613;</i><span>红娘牵线</span></a><?php }?>
        <?php if($ifcontact_hh){?>
            <a id="lx_wx"><i class="ico">&#xe607;</i><span>互换微信</span></a>
            <a id="lx_mob"><i class="ico">&#xe627;</i><span>互换手机</span></a><?php
		}
    }?>
</div>
<div id="hmd_box">
    <a id="hmd_box_btn"<?php echo $inblackclass; ?>><i class="ico">&#xe692;</i><span>屏蔽此人</span></a>
    <a href="315.php?uid=<?php echo $uidd;?>&jumpurl=<?php echo urlencode($jumpurl);?>"><i class="ico">&#xe631;</i><span>举报此人</span></a>
    <?php if(@in_array('ubbs',$navarr)){?><a id="bbs_btn2"><i class="ico">&#xe676;</i><span>评价此人</span></a><?php }?>
</div>

<?php
//评价此人
if(@in_array('ubbs',$navarr)){?>
<form id="zeai_u_bbs_form" class="u_bbs_form">
    <textarea class="textarea" name="content" id="contentubbs" placeholder="&#13;为了对您和他人负责&#13;请如实描述对此人印象或三观等...&#13;&#13;评价只有一次机会请认真对待"></textarea>
    <input type="hidden" name="uid" value="<?php echo $uidd;?>">
    <input type="hidden" name="submitok" value="ajax_bbs_add">
    <button type="button" class="btn size3 zeaibg" id="bbsaddbtnsave">提交评价</button>
</form>
<script>bbsaddbtnsave.onclick=bbsaddbtnsaveFn;bbs_btn2.onclick=bbsaddbtnFn;<?php if ($t == 1){?>bbs_btn1.onclick=bbsaddbtnFn;<?php }?></script>
<?php }
//联系方式box
if ( ifint($cook_uid) && $ifcontact){?>
<div id="contact_daylooknumHelp" class="helpDiv">
	<ul><?php
	foreach ($urole as $uv) {
		$grade = $uv->g;
		$title = $uv->t;
		$num   = $contact_daylooknum->$grade;
		$num_str = ($num>0)?' 每天能看<font class="Cf00">'.$num.'</font>人':' 无权查看';
		$ifmy = ($cook_grade==$grade)?'　　<font class="Cf00">（我）</font>':'';
		$outZ .= '<li>'.uicon($cook_sex.$grade).' '.$title.' <i class="ico">&#xe62d;</i>'.$num_str.$ifmy.'</li>';
	}echo $outZ;?>
	</ul>
	<a class="btn size3 VIP W100_ yuan" href="my_vip.php?jumpurl=<?php echo $jumpurl;?>"><i class="ico">&#xe6ab;</i> 开通VIP，畅通无极限</a>
</div>
<div id="contact_lovebHelp" class="helpDiv">
	<ul><?php
	foreach ($urole as $uv) {
		$grade = $uv->g;
		$title = $uv->t;
		$num   = $contact_loveb->$grade;
		$num_str = ($num>0)?' <font class="Cf00">'.$num.'</font> '.$_ZEAI['loveB'].'/人':' 免费查看';
		if($cook_grade==$grade){
			$ifmy = '　<font class="Cf00">（我）</font>';
			$myclkB=$num;
		}else{
			$ifmy = '';
		}
		$outE .= '<li>'.uicon($cook_sex.$grade).' '.$title.' <i class="ico">&#xe62d;</i>'.$num_str.$ifmy.'</li>';
	}echo $outE;
	//单次$myclkB解锁
	?>
	</ul>
	<a class="btn size3 zeaibg W50_" onClick="clickloveb('contact',<?php echo $uidd;?>)"><i class="ico">&#xe633;</i> 立即查看</a>
	<a class="btn size3 VIP W50_" href="my_vip.php?jumpurl=<?php echo $jumpurl;?>"><i class="ico">&#xe6ab;</i> 开通VIP</a>
</div>
<?php }
if(ifint($admid))$_ZEAI['homekefuewm']=0;
//红娘牵线
if($ifhn && $_ZEAI['homekefuewm']!=1){
	$rowhn = $db->ROW(__TBL_CRM_HN__,"id,truename,ewm,path_s","flag=1 AND ewm<>'' AND ifwebshow=1 AND id=".intval($cook_admid)." ORDER BY rand() LIMIT 1",'name');
	if (!$rowhn){
		$rowhn = $db->ROW(__TBL_CRM_HN__,"id,truename,ewm,path_s","flag=1 AND ewm<>'' AND ifwebshow=1 AND id=".$admid." ORDER BY rand() LIMIT 1",'name');
		if (!$rowhn)$rowhn = $db->ROW(__TBL_CRM_HN__,"id,truename,ewm,path_s","flag=1 AND ewm<>'' AND ifwebshow=1 ORDER BY rand() LIMIT 1",'name');
	}
	if ($rowhn){
		$hn_id       = $rowhn['id'];
		$hn_truename = dataIO($rowhn['truename'],'out');
		$hn_ewm      = $rowhn['ewm'];
		$path_s      = $rowhn['path_s'];
		$path_s_url  = (!empty($path_s))?UP.$path_s:RES.'m/img/hnico.jpg';
		$hn_ewm_url  = UP.$hn_ewm;
	}else{
		$hn_id = 0;
		$path_s_url = RES.'photo_m.png';
		$hn_ewm_url = UP.dataIO($_ZEAI['kf_wxpic'],'out');
	}
	if (!empty($cook_photo_s) && $cook_photo_f == 1){
		$cook_photo_m_url = UP.smb($cook_photo_s,'m');
	}else{
		$cook_photo_m_url = RES.'photo_m'.$cook_sex.'.png';
	}
	if($cook_qxnum_ed_herme>0){
		$qxbtn_str='<i class="ico">&#xe61b;</i> 牵线中';
		$qxbtn_cls='HUANG';
	}else{
		$qxbtn_str='委托【'.$hn_truename.'】牵线';
		$qxbtn_cls='zeaibg';
	}?>
    <script>var winh=<?php echo (is_weixin())?30.5:37.5;?>,qx_1price_C='<?php if($cook_qxnum==0 && $qx_1price>0)echo dataIO( $_VIP['qx_1price_C'],'out');?>';</script>
	<div id="hnbox">
		<dl><dt>
            <div class="senduid"><img src="<?php echo $cook_photo_m_url;?>" /><font class="zeaicolor">我<?php if (ifint($cook_uid)){?><span>ID：<?php echo $cook_uid;?></span><?php }?></font></div>
            <div class="admid"><em class="hnpic"><img src="<?php echo $path_s_url;?>" /><b>红娘</b></em><font class="zeaicolor"><?php echo $hn_truename;?></font></div>
            <div class="uid"><img src="<?php echo $photo_m_url;?>" /><font class="zeaicolor"><?php echo $nicknamee;?><span>ID：<?php echo $uidd;?></span></font></div>           
			</dt><dd><img src="<?php echo $hn_ewm_url; ?>"><h6 class="C999">长按二维码加红娘微信</h6><a href="<?php echo a('{"kind":"my_hongniang"}');?>?t=qx&jumpurl=<?php echo $jumpurl;?>">我的牵线记录<?php if($cook_qxnum_ed>0)echo '('.$cook_qxnum_ed.')';?></a></dd>
		</dl>
		<button type="button" class="btn size4 yuan <?php echo $qxbtn_cls;?> " id="qx_btnFn" <?php if ($cook_qxnum_ed_herme == 0){?>onClick="qx_btnFn(<?php echo $uidd;?>,<?php echo $hn_id;?>,'<?php echo $hn_truename;?>');"<?php }?>><?php echo $qxbtn_str;?></button>
	</div>
	<?php
	if($cook_qxnum==0 && $qx_1price>0){
		$jump_url = mHref('u',$uidd);
		$money = $qx_1price;
		$kind  = 23;
		echo '<input type="hidden" id="money" value="'.$money.'">';
		echo '<input type="hidden" id="qx_admid" value="'.$hn_id.'">';
		echo '<input type="hidden" id="qx_uid" value="'.$uidd.'">';?>
		<!--<a id="nextbtn">确认支付</a>-->
		<?php require_once 'my_pay.php';
	}
}
//互换开始
if($ifcontact_hh){
	if(ifint($cook_uid)){
		$cook_hh_num_ed = $db->COUNT(__TBL_HH__," senduid=".$cook_uid);
		$cook_hh_num_ed = ($cook_hh_num_ed>0)?'　<a href="my_huhuan.php">'.$cook_hh_num_ed.' 次互换记录</a>':'';
	}?>
	<form id="hh_wx_form" class="hhbox_form">
		<div><i class="ico wxi">&#xe607;</i><input class="input" name="content" id="content" placeholder="请输入本人微信号" maxlength="30" value="<?php echo $cook_weixin;?>"></div>
		<em>对方同意后，双方可看，微信必须真实有效，否则将纳入失信人员名单并进行<font class="Cf00">封号处理</font></em>
		<input type="hidden" name="uid" value="<?php echo $uidd;?>">
		<input type="hidden" name="submitok" value="ajax_hh_update">
		<input type="hidden" name="kind" value="weixin">
		<div class="sy">当前剩余<b><?php echo $cook_hh_num ;?></b>次<?php echo $cook_hh_num_ed;?></div>
		<button type="button" class="btn size3 zeaibg" onClick="hhsend('hh_wx_form')"><i class="ico">&#xe691;</i> 确认发送</button>
	</form>
	<form id="hh_mob_form" class="hhbox_form">
		<div><i class="ico mobi">&#xe627;</i><input class="input" name="content" id="content" placeholder="请输入本人手机号码" maxlength="11" value="<?php echo $cook_mob;?>"></div>
		<em>对方同意后，双方可看，手机必须真实有效，否则将纳入失信人员名单并进行<font class="Cf00">封号处理</font></em>
		<input type="hidden" name="uid" value="<?php echo $uidd;?>">
		<input type="hidden" name="submitok" value="ajax_hh_update">
		<input type="hidden" name="kind" value="mob">
		<div class="sy">当前剩余<b><?php echo $cook_hh_num ;?></b>次<?php echo $cook_hh_num_ed;?></div>
		<button type="button" class="btn size3 zeaibg" onClick="hhsend('hh_mob_form')"><i class="ico">&#xe691;</i> 确认发送</button>
	</form>
	<script>
	lx_wx.onclick=hh_wxFn;
	lx_mob.onclick=hh_mobFn;
	</script>
	<?php
}//互换结束
if($cook_uid!=$uid){?>
<div class="u2_btm">
	<?php if(!$ifgift && !$ifhi && !$ifhn){?>
    	<a class="back2" onclick="zeai.back()"><i class="ico">&#xe602;</i><span>返回</span></a>
    <?php }else{
			if($ifgift){?>
        	<a class="zeaicolor" onclick="gift2_btnFn()"><i class="ico">&#xe600;</i><span>送礼物</span></a>
		<?php }elseif($ifhn){?>
        	<a class="zeaicolor" onclick="<?php echo ($_ZEAI['homekefuewm']==1)?'hnFn2()':'hnFn()';?>"><i class="ico">&#xe613;</i><span>红娘牵线</span></a>
        <?php }?>
        <?php if($ifhi){?><a id="hi" class="zeaicolor"><i class="ico">&#xe8ca;</i><span>打招呼</span></a><?php }?>
    <?php }?>
    <a class="zeaibg"><em id="lx_btn"><i class="ico">&#xe629;</i> <span>联系Ta</span></em><i class="ico hmd" id="hmd_btn">&#xe62a;</i></a>
</div>
<?php
}if ($_ZEAI['homekefuewm']==1){?>
<div class="lx_kefu" id="homekefuewm">
    <?php if (!empty($kf_wxpic) ){?><img src="<?php echo UP.$kf_wxpic;?>"><font>长按二维码加客服微信</font><br /><br /><?php }?>
    <?php if (!empty($kf_tel)){?>
        <i class="ico zeaicolor">&#xe68b;</i> <a href="tel:<?php echo $kf_tel;?>" class="zeaicolor"><?php echo $kf_tel;?> (点击拔打)</a>
    <?php }else{?>
        <?php if (!empty($kf_mob)){?><i class="ico zeaicolor">&#xe627;</i> <a href="tel:<?php echo $kf_mob;?>" class="zeaicolor"><?php echo $kf_mob;?> (点击拔打)</a><?php }?>
    <?php }?>
</div>
<?php }
require_once ZEAI.'m/TRnav.php';?>
<div class="blank"></div>
<div id='tips0_100_0' class='tips0_100_0 alpha0_100_0'></div>
<script>
<?php 
//打招呼
if ($ifhi){
	$hi_textlist=explode('<br>',$_SMS['hi_textlist']);
	$hi_textlist_num=count($hi_textlist);
	if($_SMS['hi_kind']==2){
		if($hi_textlist_num>1){
			echo 'hi.onclick=hiFn_hand;';
		}else{
			echo 'hi.onclick=function(){hiFn_send("'.trimhtml(dataIO($_SMS['hi_textlist'],'out')).'")}';
		}
	}else{
		echo 'hi.onclick=hiFn;';
	}
}
if($ifchat)echo 'lx_chat.onclick=chatFn;';
if($ifcontact)echo 'lx_lxfs.onclick=mycontactFn;';
if($ifhn){
	echo ($_ZEAI['homekefuewm']==1)?'lx_hn.onclick=hnFn2;':'lx_hn.onclick=hnFn;';
}
if ($photo_total > 0 && $ifblur==0 && $t==3)echo 'PlistFn('.$pic_list.');';
if($cook_uid!=$uid){
?>
lx_btn.onclick=function(){zeai.mask({son:lx_box,maskcls:'mask_TRnav'});}
hmd_btn.onclick=function(){zeai.mask({son:hmd_box,maskcls:'mask_TRnav'});}
hmd_box_btn.onclick=inBlackFn2;
<?php }?>
</script>
</body></html><?php ob_end_flush();?>